#ifndef TMMOTORWORKER_H
#define TMMOTORWORKER_H

#include <QObject>

class TMMotorWorker : public QObject
{
    Q_OBJECT
public:
    explicit TMMotorWorker(QObject *parent = 0);

signals:
    //sensor
    void sig_sensorBatteryInfo(QString m_data);
    void sig_sensorSonicInfo(QString m_data);
    void sig_sensorInfraredInfo(QString m_data);
    void sig_sensorWheelInfo(QString m_data);

    void sig_getProtectState(bool m_bProtectState);

public slots:
    //head
    void slot_headEnable();
    void slot_headPowerDown();
    void slot_headLRInit();
    void slot_headUDInit();
    void slot_headLRAngle(int nAngle,int nSpeed);
    void slot_headUDAngle(int nAngle,int nSpeed);
    //left hand
    void slot_handLEnable();
    void slot_handLPowerDown();
    void slot_handLSwingInit();
    void slot_handLExpandInit();
    void slot_handLSwingAngle(int nAngle,int nSpeed);
    void slot_handLExpandAngle(int nAngle,int nSpeed);
    //right hand
    void slot_handREnable();
    void slot_handRPowerDown();
    void slot_handRSwingInit();
    void slot_handRExpandInit();
    void slot_handRSwingAngle(int nAngle,int nSpeed);
    void slot_handRExpandAngle(int nAngle,int nSpeed);
    //wheel
    void slot_wheelEnable();
    void slot_wheelPowerDown();
    void slot_wheelStop(bool bStopAbrupt);
    void slot_wheelRunRotate(int nAngle,int nSpeed);
    void slot_wheelRun(int nDistance,int nSpeed);
    void slot_wheelRunDiff(bool bLeft,int nLeftSpeed,bool bRight,int nRightSpeed);
    //sensor
    void slot_sensorBattery();
    void slot_sensorSonic();
    void slot_sensorInfrared();
    void slot_sensorWheel();
    //led
    void slot_ledHeadEye(int nIndexF,int nIndexB);
    void slot_ledHeadEye2(int nDelay,bool nR,bool nG,bool nB);
    void slot_ledHeadEar(int nDelay,bool nR,bool nG,bool nB);
    void slot_ledBodyLed(int nDelay,bool nR,bool nG,bool nB);
    void slot_ledTouchSet(bool bMode,int nColor,int nDelay);
    //壁障
    void slot_protectSet(bool bOpen);
    void slot_protectState();


};

#endif // TMMOTORWORKER_H
